home *** CD-ROM | disk | FTP | other *** search
- property soundName, soundState, buttonObject
- global gActorList, gMenuObject, gHelpObject, gCDpath, gFileSep
-
- on birth me, helpButtonObject, sectionName
- set soundState to #off
- set soundName to getProp(the helpList of gMenuObject, sectionName)
- set the mouseDownScript to "stopHelpSound"
- set buttonObject to helpButtonObject
- hideActor(buttonObject)
- set gHelpObject to me
- add(gActorList, gHelpObject)
- end
-
- on update me
- if not soundBusy(1) then
- if soundState = #off then
- sound playFile 1, gCDpath & "SOUND" & gFileSep & "HELP" & gFileSep & soundName
- set soundState to #on
- else
- stopSound(me)
- end if
- end if
- end
-
- on stopSound me
- sound stop 1
- set the mouseDownScript to EMPTY
- clearActor(me)
- showAllActors()
- dontPassEvent()
- end
-